package com.jason.lucene.example.analysis;

import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.core.WhitespaceAnalyzer;
import org.junit.Test;

/**
 * @author he peng
 * @create 2017/12/7 19:17
 * @see
 */
public class LuceneBuiltInAnalyzerTest {

    @Test
    public void testBuiltInAnalyzer() throws Exception {

        String text = "The quick brown fox jumped over the lazy dog";
        WhitespaceAnalyzer whitespaceAnalyzer = new WhitespaceAnalyzer();
        TokenStream tokenStream = whitespaceAnalyzer.tokenStream("field", text);
        System.out.println("tokenStream ==> " + tokenStream);


    }
}
